package aop05;

import aop03.SomeException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Test {
    public static void main(String[] args) {
        ApplicationContext ac = new ClassPathXmlApplicationContext("aop05/spring.xml");
        UserService userService = (UserService) ac.getBean("userService");

        try {
            userService.regist();
        } catch (SomeException e) {
        }

        System.out.println("******************************");
        userService.login();
        System.out.println("******************************");
        userService.doSome();
        System.out.println("******************************");
        userService.add(3,5);
        System.out.println("******************************");
        userService.doEveryOne("毛主席");

    }
}
